﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using Excell_On_Services.Models;

namespace Excell_On_Services.ViewModels
{
    public class EmployeeModel
    {
        [HiddenInput(DisplayValue = false)]
        public Guid EmployeeID { get; set; }

        [Required]
        [DisplayName("User name")]
        public string username { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [DisplayName("Email address")]
        public string Email { get; set; }

        [Required]
        [ValidatePasswordLength]
        [DataType(DataType.Password)]
        [DisplayName("Password")]
        public string Password { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [DisplayName("Confirm password")]
        public string ConfirmPassword { get; set; }

        [Required(ErrorMessage = "Company name is required")]
        public string FullName { get; set; }

        //[Required(ErrorMessage = "Address is required")]
        //[RegularExpression(@"^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$", ErrorMessage = "Invalid Email Address")]
        ////[DataType(DataType.EmailAddress,ErrorMessage="Not a valid email")]
        //public string Email { get; set; }

        [Required(ErrorMessage = "Address is required")]
        public string Address { get; set; }

        [Required(ErrorMessage = "BirthDay is required")]
        [DisplayName("BirthDay : (dd/mm/yyyy)")]
        [DataType(DataType.Date)]
        public DateTime? BirthDate { get; set; }

        public bool Sex { get; set; }
        public bool IsLock { get; set; }

        [Required(ErrorMessage = "Phone is required")]
        public string Phone { get; set; }

        [DataType(DataType.MultilineText)]
        public string Notes { get; set; }


        [Required(ErrorMessage = "Department is required")]
        [DisplayName("Department ID")]
        public int DepartmentID { get; set; }

    }
}